package com.ecoolex.ying.space.ws;

import java.util.List;

import org.apache.dubbo.config.annotation.Service;
import org.springframework.beans.factory.annotation.Autowired;

import com.ecoolex.framework.common.exception.BizException;
import com.ecoolex.framework.common.pojo.Page;
import com.ecoolex.framework.common.pojo.Pagination;
import com.ecoolex.framework.common.pojo.Sorting;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityExternalGoodsCategoryManager;
import com.ecoolex.ying.space.core.manager.EstateProjectActivityExternalGoodsManager;
import com.ecoolex.ying.space.entity.EstateProjectActivityExternalGoods;
import com.ecoolex.ying.space.entity.EstateProjectActivityExternalGoodsCategory;

@Service
public class EstateProjectActivityExternalGoodsServiceImpl implements EstateProjectActivityExternalGoodsService{

	@Autowired
	private EstateProjectActivityExternalGoodsManager manager;
	
	@Override
	public EstateProjectActivityExternalGoods get(Integer externalGoodsId) {
		return manager.get(externalGoodsId);
	}

	@Override
	public Pagination<EstateProjectActivityExternalGoods> query(Integer projectId,String name,Integer externalGoodsCategoryId, Sorting[] sorts, Page page) {
		return manager.query(projectId,name,externalGoodsCategoryId, sorts, page);
	}
	
	@Override
	public Pagination<EstateProjectActivityExternalGoods> queryForH5(Integer projectId,Integer externalGoodsCategoryId,Page page) {
		return manager.queryForH5(projectId,externalGoodsCategoryId,page);
	}

	@Override
	public EstateProjectActivityExternalGoods add(EstateProjectActivityExternalGoods add, String createUser) throws BizException {
		return manager.add(add, createUser);
	}

	@Override
	public EstateProjectActivityExternalGoods edit(EstateProjectActivityExternalGoods edit, String updateUser) throws BizException {
		return manager.edit(edit, updateUser);
	}

	@Override
	public void delete(EstateProjectActivityExternalGoods record, String updateUser) throws BizException {
		manager.delete(record, updateUser);
	}

	@Override
	public void online(EstateProjectActivityExternalGoods record, String updateUser) throws BizException {
		manager.online(record, updateUser);
	}

	@Override
	public void offline(EstateProjectActivityExternalGoods record, String updateUser) throws BizException {
		manager.offline(record, updateUser);
	}

	@Autowired
	private EstateProjectActivityExternalGoodsCategoryManager categoryManager;
	
	@Override
	public EstateProjectActivityExternalGoodsCategory getCategory(Integer externalGoodsCategoryId) {
		return categoryManager.getCategory(externalGoodsCategoryId);
	}
	
	@Override
	public List<EstateProjectActivityExternalGoodsCategory> childrenCategory(Integer externalGoodsCategoryId) {
		return categoryManager.childrenCategory(externalGoodsCategoryId);
	}

	@Override
	public Pagination<EstateProjectActivityExternalGoodsCategory> queryCategory(Integer projectId, String name, Sorting[] sorts, Page page) {
		return categoryManager.queryCategory(projectId, name, sorts, page);
	}

	@Override
	public Pagination<EstateProjectActivityExternalGoodsCategory> queryCategoryForH5(Integer projectId, Page page) {
		return categoryManager.queryCategoryForH5(projectId, page);
	}

	@Override
	public EstateProjectActivityExternalGoodsCategory addCategory(EstateProjectActivityExternalGoodsCategory record, String createUser) throws BizException {
		return categoryManager.addCategory(record, createUser);
	}

	@Override
	public EstateProjectActivityExternalGoodsCategory editCategory(EstateProjectActivityExternalGoodsCategory record, String updateUser) throws BizException {
		return categoryManager.editCategory(record, updateUser);
	}

	@Override
	public void deleteCategory(EstateProjectActivityExternalGoodsCategory record, String updateUser) throws BizException {
		categoryManager.deleteCategory(record, updateUser);
	}

	@Override
	public void onlineCategory(EstateProjectActivityExternalGoodsCategory record, String updateUser) throws BizException {
		categoryManager.onlineCategory(record, updateUser);
	}

	@Override
	public void offlineCategory(EstateProjectActivityExternalGoodsCategory record, String updateUser) throws BizException {
		categoryManager.offlineCategory(record, updateUser);
	}

}
